package com.jielin.handling.entity.vo;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jielin.handling.bean.base.BaseSearch;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by wangjienice on 2019-04-09.
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CasePicVo  extends BaseSearch {
    private String id;
   private String caseType;
   private String sumCaseCode;
   private String countCaseCode;
   private String caseName;
   private String caseCode;
   private Integer criminalCase;//刑事案件数量
   private Integer civilCase;//民事案件数量
   private Integer politicsCase;//政治案件数量
   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
   @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
   private Date  acceptTime;//案件受理时间
   private String suspectnameAndDate;//嫌疑人和登记时间
   private String organizationName;//单位名称
   private String unitcode;
   private String unitCode;
   private String caseStaus;
   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
   @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
   private Date startDate;
   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
   @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
   private Date endDate;

   @Override
   public void setQueryCondition(JSONObject queryCondition) {
      this.caseName=queryCondition.getString("caseName");
      this.caseCode=queryCondition.getString("caseCode");
      this.caseType=queryCondition.getString("caseType");
      this.unitCode=queryCondition.getString("unitCode");
      this.acceptTime=queryCondition.getDate("acceptTime");
      this.startDate=queryCondition.getDate("startDate");
      this.endDate=queryCondition.getDate("endDate");

   }
}
